<?php
header('content-type:text/html;charset=utf-8');
include_once 'upload.php';
$i=0;
//print_r($_FILES);
	foreach ($_FILES as $fileinfo) {
		if(is_string($fileinfo['name'])){
			$files[$i]=$fileinfo;
			$i++;
		}
		elseif(is_array($fileinfo['name'])){
			foreach ($fileinfo['name'] as $key => $value) {
				$files[$i]['name']=$fileinfo['name'][$key];
				$files[$i]['type']=$fileinfo['type'][$key];
				$files[$i]['tmp_name']=$fileinfo['tmp_name'][$key];
				$files[$i]['error']=$fileinfo['error'][$key];
				$files[$i]['size']=$fileinfo['size'][$key];
			}
		}
	}
?>